#include "PreCompile.hpp"
#include "../CLangModule.hpp"
#include "MiscTests.hpp"

namespace BuildNG
{
  void MiscTests::test_clang_source_file_type_by_ext()
  {
    assert(clang_source_file_type_by_ext("test.txt") == CLangSourceFileType_Unknown);
    assert(clang_source_file_type_by_ext("test.c") == CLangSourceFileType_CSource);
    assert(clang_source_file_type_by_ext("test.cc") == CLangSourceFileType_CppSource);
    assert(clang_source_file_type_by_ext("test.ccc") == CLangSourceFileType_Unknown);
    assert(clang_source_file_type_by_ext("test.cpp") == CLangSourceFileType_CppSource);
    assert(clang_source_file_type_by_ext("test.cPp") == CLangSourceFileType_CppSource);
    assert(clang_source_file_type_by_ext("cpp") == CLangSourceFileType_Unknown);
    assert(clang_source_file_type_by_ext("cpp.") == CLangSourceFileType_Unknown);
    assert(clang_source_file_type_by_ext("") == CLangSourceFileType_Unknown);
    assert(clang_source_file_type_by_ext("test.h") == CLangSourceFileType_Header);
    assert(clang_source_file_type_by_ext("test.hpp") == CLangSourceFileType_Header);
  }
}
